typedef struct
{
    {%- set current_type = "uint32_t" if struct.total_bits > 16 else "uint16_t" %}
    {%- for element in struct.elements %}
    {{ current_type }} {{ element.name }} : {{ element.bit_len }}; {%- if element.description %} /* {{ element.description }} */{%- endif %}
    {%- endfor %}
} {{ struct.name }};